<option value="0">请选择</option>
<?php foreach ($brand->result() as $item) : ?>
    <option value="<?php echo $item->brand_id ?>" <?php if (isset($result->brand_id) && $result->brand_id == $item->brand_id) : ?>selected="selected" <?php endif; ?>><?php echo $item->brand_name ?></option>
<?php endforeach; ?>